package org.example.util;

import javax.swing.*;
import java.awt.*;
import java.io.InputStream;

/**
 * @ClassName: ImageApp
 * @Description:
 * @Author: zkd
 * @Date: 2024/3/20 17:11
 * @Version: 1.0
 **/
public class ImageApp extends JFrame {
    public ImageApp(byte[] bytes) {
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
        setSize(400, 300);
        setResizable(false);
        getContentPane().setLayout(null);
        JPanel panel = new ImagePanel(bytes);
        panel.setBounds(0, 0, 400, 300);
        getContentPane().add(panel);
        setVisible(true);
    }
}
